<template>
  <div class="begin_sub mbm" v-if="users_guide">
     <a-alert class="alert_beginner"
      message="新手提示"      
      type="success"
      showIcon      
      closeText="X 关闭" 
      closable
      :afterClose="onClose"
    ><a-icon type="smile" slot="icon" />
    <div slot="description">
        初次使用配置较多，建议使用向导开启您的此次AI技术探索。 <a-button class="mbm" type="primary" @click="toGuide" >点此进入新手向导 >></a-button>
      </div>
    </a-alert>
  </div>
</template>

<script>
export default {
  data() {
    return {
      
    };
  },
  props: {},
  computed: {
    users_guide(){
      return this.$store.state.common.setting.users_guide == "off" ? false : true
    }
  },
  methods:{
    toGuide(){
      this.$router.push({path: '/guide'})
    },
    onClose(){      
      this.$api.setting
        .set({
          key: "users_guide",
          value: 'off',
          noSql: true
        })
        .then(() => {
        })
        .catch(() => {
          
        });
    }
  }
};
</script>

<style lang="less" scoped>
.alert_beginner{
  border: 0px dashed @primary-color;
  background: #f0f7f0;
  //padding: 20px;
}
</style>